<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>Bootstrap 实例 - 边框表格</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>

<table class="table table-bordered">
    <caption>欢迎，</caption>
    <thead>
    <tr >
        <th>ID</th>
        <th>姓名</th>
        <th>薪水</th>
        <th>年龄</th>
        <th>生日</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <tr th:each="emp:${empList}">
        <td><span th:text="${emp.id}"></span></td>
        <td><span th:text="${emp.name}"></span></td>
        <td><span th:text="${emp.salary}"></span></td>
        <td><span th:text="${emp.age}"></span></td>
        <td><span th:text="${#dates.format(emp.bir,'yyyy-MM-dd')}"></span></td>
        <td><a th:href="@{/emp/del/(id=${emp.id})}">删除</a> <a th:href="@{/emp/edit/(id=${emp.id})}">修改</a> </td>
    </tr>

    </tbody>
</table>
<p>
    <button type="button" class="btn btn-default" onclick="location.href='/toadd'">添加</button>
    <button type="button" class="btn btn-warning" onclick="location.href='/upload'">文件上传</button>
</p>
</body>
</html>